<?php

namespace app\api\controller;

use app\common\controller\Api;
use fast\Random;
use think\Config;
use think\Validate;
use app\common\model\Template as Templates;
class Template extends Api{
    protected $noNeedRight = '*';

    public function _initialize()
    {
        parent::_initialize();

    }
    public function list(){
        $map = ['status' => 1];
        $items = Templates::where($map)->order('id desc')->field('id,content,image,name,desc')->paginate(10);
        $this->success(__('capture successful'),$items);
    }

}